#include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<int, int> pii;

void solve() {
    int n, m;
    cin >> n >> m;
    vector<vector<int>> grid(n + 1, vector<int>(n + 1, -1));
    map<int, int> mpwx, mpwy, mpbx, mpby;
    for(int i = 0; i < m; i++){
        int x, y;
        string op;
        cin >> x >> y >> op;
        if(op == "W") {
            mpwx[x] = max(mpwx[x], y);
            mpwy[y] = max(mpwy[y], x);
        }else{
            if(mpbx.count(x)) {
                mpbx[x] = min(mpbx[x], y);
            }else{
                mpbx[x] = y;
            }
            if(mpby.count(y)) {
                mpby[y] = min(mpby[y], x);
            }else{
                mpbx[y] = x;
            }           
        }
        if(mpbx[x] < mpwx[x]){
            cout << "No\n";
            return;
        }
        if(mpby[y] < mpwy[y]) {
            cout << "No\n";
            return;
        }
    }
    cout << "Yes\n";
}

int main() {
    solve();
    return 0;
}